package beans;

import java.util.ArrayList;

/**
 * @author Benjamin Gouit
 *
 */
public class Terme {

	// Id
	private int m_id;
	// Terme
	private String m_terme;
	// Fréquence
	private int m_frequence;
	// Tableau des positions
	private ArrayList<Integer> m_position;
	
	public Terme(){}
	
	public Terme(String terme, int frequence, int position) {
		this.m_terme = terme;
		this.m_frequence = frequence;
		this.m_position = new ArrayList<Integer>();
		this.m_position.add(position);
	}
	
	public int getId() {
		return m_id;
	}
	public void setId(int id) {
		this.m_id = id;
	}
	public String getTerme() {
		return m_terme;
	}
	public void setTerme(String terme) {
		this.m_terme = terme;
	}
	public int getFrequence() {
		return m_frequence;
	}
	public void setFrequence(int frequence) {
		this.m_frequence = frequence;
	}
	public ArrayList<Integer> getPosition() {
		return m_position;
	}
	public void setPosition(int position) {
		this.m_position.add(position);
	}

	@Override
	public String toString() {
		return "Terme [Freq=" + m_frequence
				+ ", Position=" + m_position + "]\n";
	}
}
